From: Florian Müllner Date: Wed, 31 Jul 2019 23:24:13 +0000 (+0200) Subject: weather: Fix warning on closing Weather X-Git-Tag: archive/raspbian/50.5-1+rpi1~1^2~839^2^2~32 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=ad55cb6d5ddbef67ae84901e48f82bcdb7c98887;p=gnome-shell.git weather: Fix warning on closing Weather GDBusProxy::g-properties-changed is also emitted when the name drops from the bus, at which point any properties will be null. That's not a valid gsettings value, so to avoid the corresponding warning, move the g-name-owner check accordingly. https://gitlab.gnome.org/GNOME/gnome-shell/issues/1158 --- diff --git a/js/misc/weather.js b/js/misc/weather.js index 3e1a2ba86..f097c76f6 100644 --- a/js/misc/weather.js +++ b/js/misc/weather.js @@ -153,12 +153,13 @@ var WeatherClient = class { this._weatherProxy.connect('g-properties-changed', this._onWeatherPropertiesChanged.bind(this)); - - if (this._weatherProxy.g_name_owner != null) - this._onWeatherPropertiesChanged(); + this._onWeatherPropertiesChanged(); } _onWeatherPropertiesChanged() { + if (this._weatherProxy.g_name_owner == null) + return; + this._settings.set_boolean('automatic-location', this._weatherProxy.AutomaticLocation); this._settings.set_value('locations',